package com.example.demo.response;

import lombok.Getter;

//错误码和错误信息
public enum RspCodeInfoEnum {
    Success(0000,"成功."),
    Field_Error(2001,"参数错误.手机号和姓名皆不能为空."),
    Insert_Fail(2002,"添加失败"),

    Null_Pointer(-2000,"空指针异常。");



    @Getter
    private int code ;
    @Getter
    private String info;
    RspCodeInfoEnum(int code, String info){
        this.code = code;this.info = info;
    }

    @Override
    public String toString() {
        return "错误码(code): " + code + ", 错误信息(info): " + info + "}\n";
    }
}
